<el-dialog :close-on-click-modal="false"  :close-on-press-escape="false"  class="dialogStyleBase maxHeight" title="设置规则" :visible.sync="mixinEdit_editVisible" width="94vw" top="20px"
    :before-close="handleClose" append-to-body>
    <div class="rule-main" v-loading="load">
        <div class="detail">

            <LayoutCell>
                <LayoutCellItem title="权益类型">
                    <el-button type="primary" slot="option" @click="toUpdate({type:'update'})">编辑</el-button>
                    <LayoutDetailGroup :gutter="20">
                        <LayoutDetailItem :span="24" label="权益类型" value="商品折扣"></LayoutDetailItem>
                        <LayoutDetailItem :span="12" label="权益名称" :value="dataObj.rightName"></LayoutDetailItem>
                        <LayoutDetailItem :span="12" label="权益说明" :value="dataObj.remark"></LayoutDetailItem>
                    </LayoutDetailGroup>

                </LayoutCellItem>

                <LayoutCellItem title="权益规则">
                    <el-button type="primary" slot="option" @click="toRuleDialog({type:'add'})">新增权益规则</el-button>
                </LayoutCellItem>

            </LayoutCell>



        </div>

        <div class="table">


            <el-table border v-loading="mixinList_loading" :data="mixinList_tableData" style="width: 100%;"
                height="100%" default-expand-all row-key="id">
                <el-table-column label="权益规则名称" prop="rightRuleName"></el-table-column>
                </el-table-column>
                <el-table-column label="折扣">
                    <template slot-scope="scope">
                        {{scope.row.discountValue + '折'}}
                    </template>
                </el-table-column>
                <el-table-column label="操作" width="300" align="center">
                    <template slot-scope="scope">
                        <el-button @click="toRuleDialog({type:'update',ruleId:scope.row.id})">
                            编辑
                        </el-button>
                        <el-button @click="toGoodsList(scope.row.id)" v-if="dataObj.rightType === 1">
                            设置商品
                        </el-button>

                        <!-- @click="deleteRule(scope.row.id)" -->
                        <el-button type=" danger" plain @click="mixinList_selectTableDeleteData([scope.row])">
                            删除
                        </el-button>

                    </template>
                </el-table-column>


            </el-table>



        </div>
        <div class="footer">
            <el-pagination class="paginationStyle" v-if="mixinList_pageData.total>0" background
                @current-change="mixinList_pagingData($event,'tableData')" :current-page="mixinList_pageData.pageNum"
                :page-size.sync="$vFN.Constants.pageSize" layout="total, prev, pager, next,jumper"
                :total.sync="mixinList_pageData.total">
            </el-pagination>
        </div>
    </div>
</el-dialog>